<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>呼送后台管理系统-首页</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
			<link rel="stylesheet" type="text/css" href="styles.css">
		-->
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>Js/jquery-easyui-1.3.2/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>Js/jquery-easyui-1.3.2/themes/icon.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>Js/jquery-easyui-1.3.2/demo/demo.css">
		<script type="text/javascript"
			src="<%=basePath%>Js/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>Js/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>
	
	
		<!--  加载script -->
		<script type="text/javascript">
			$(document).ready(function(){
				$("#login_button").click(function(){
					var username = $("input[name='username']").val();
					var password = $("input[name='password']").val();
					$.post("<%=basePath%>man/login",{username:username,password:password},function(data){
						var result = jQuery.parseJSON(data);
						if(result.result=='0'){
							// 跳转下面的页面
							location.href = "<%=basePath%>man/main";
						}
					});
				});
			});
		</script>

	</head>

	<body style="text-align: center;">
		<div id="w" class="easyui-window" title=" 请先登录 " 
			data-options="iconCls:'icon-ok',collapsible:false,minimizable:false,maximizable:false,closable:false" 
			style="width:360px;height:190px;padding:10px;">
			
			<!--  加载控件 2015年5月8日15:39:02 -->
			
			<table>
				<tr>
	    			<td style="width: 120px;">登录用户:</td>
	    			<td><input class="easyui-validatebox" type="text" name="username" data-options="required:true" value="admin"></input></td>
	    		</tr>
	    		<tr>
	    			<td colspan="2">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td style="width: 120px;">登录密码:</td>
	    			<td><input class="easyui-validatebox" type="password" name="password" data-options="required:true" value="admin"></input></td>
	    		</tr>
	    		<tr>
	    			<td colspan="2">&nbsp;</td>
	    		</tr>
	    		<tr>
	    			<td style="width: 120px;">&nbsp;</td>
	    			<td><a class="easyui-linkbutton" id="login_button">确定登录</a></td>
	    		</tr>
	    		
			</table>
			
		</div>

	</body>
</html>
